import React from "react";
import LayOutIndex from "@/components/layout/index.jsx";
import lazyLoad from "@/router/utils/lazyLoad.jsx";
import NestedMenu from "@/views/nestedMenu/index.jsx";
// menu 模块
const menuRouter = [
    {
        element: <LayOutIndex/>,
        meta: {
            title: "嵌套菜单"
        },
        children: [
            {
                path: "/menu/menu1",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单1",
                    key: "menu1"
                }
            },
            {
                path: "/menu/menu2/menu21",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单2-1",
                    key: "menu21"
                }
            },
            {
                path: "/menu/menu2/menu22/menu221",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单2-2-1",
                    key: "menu221"
                }
            },
            {
                path: "/menu/menu2/menu22/menu222",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单2-2-2",
                    key: "menu222"
                }
            },
            {
                path: "/menu/menu2/menu23",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单2-3",
                    key: "menu23"
                }
            },
            {
                path: "/menu/menu3",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: true,
                    title: "菜单3",
                    key: "menu3"
                }
            },
            {
                path: "/menu/menu5",
                element: lazyLoad(NestedMenu),
                meta: {
                    requiresAuth: false,
                    title: "menu5",
                    key: "menu4"
                }
            }
        ]
    }
];

export default menuRouter;
